// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie.core;

import java.io.PrintStream;

public final class ProxyPrintStream extends PrintStream {
    private PrintStream fileStream = null;
    private PrintStream systemStream = null;

    public ProxyPrintStream(PrintStream system, PrintStream file) {
        super(system);
        this.systemStream = system;
        this.fileStream = file;
    }

    public void print(String str) {
        this.systemStream.print(str);
        this.fileStream.print(str);
        this.fileStream.flush();
    }

    public void println(String str) {
        this.systemStream.println(str);
        this.fileStream.println(str);
        this.fileStream.flush();
    }

    public void println(Object o) {
        this.systemStream.println(o);
        this.fileStream.println(o);
        this.fileStream.flush();
    }

    public void write(byte[] _byte, int int0, int int1) {
        this.systemStream.write(_byte, int0, int1);
        this.fileStream.write(_byte, int0, int1);
        this.fileStream.flush();
    }

    public void flush() {
        this.systemStream.flush();
        this.fileStream.flush();
    }
}
